package com.gitee.bo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class CommentBo {

    @NotNull(message = "订单ID不能为空")
    private Integer orderId;

    @NotEmpty(message = "评价详情不能为空")
    private List<CommentItem> commentItems;

    @Data
    public static class CommentItem {

        @NotNull(message = "订单详情ID不能为空")
        private Integer orderItemId;

        @NotBlank(message = "评价标签不能为空")
        private String tag;

        @NotBlank(message = "评价内容不能为空")
        private String content;
    }

}
